<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center Immediatereturn_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub Immediatereturn_fd0_0'>
          <view class='flex flex-wrap align-center Immediatereturn_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  Immediatereturn_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='Immediatereturn_fd0_0_c1_c0'>立即归还</text>
          </view>
          <view class='flex flex-wrap align-center justify-end Immediatereturn_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center">
        <view class='flex flex-direction flex-wrap align-stretch Immediatereturn_fd1_0'>
          <view class='flex flex-wrap align-center Immediatereturn_fd1_0_c0'>

            <view class='flex  Immediatereturn_fd1_0_c0_c0'></view>

            <text class='Immediatereturn_fd1_0_c0_c1'>寄回地址</text>
          </view>
          <view class='flex flex-wrap align-center margin-top-sm Immediatereturn_fd1_0_c1'>
            <text class='Immediatereturn_fd1_0_c1_c0'>收货人</text>
            <text>{{info.name}}</text>
          </view>
          <view class='flex flex-wrap align-center Immediatereturn_fd1_0_c1'>
            <text class='Immediatereturn_fd1_0_c1_c0'>联系电话</text>
            <text>{{info.phone}}</text>
          </view>
          <view class='flex flex-wrap align-center Immediatereturn_fd1_0_c3' @tap.stop="copyText(info.address)">
            <text class='Immediatereturn_fd1_0_c1_c0'>退货地址</text>
            <text class='Immediatereturn_fd1_0_c3_c1'>{{info.area_area}}{{info.address}}</text>
            <text class='self-end flex-sub Immediatereturn_fd1_0_c3_c1_c1'>复制</text>
            <!-- <view class='flex flex-direction Immediatereturn_fd1_0_c3_c1' @tap.stop="copyText(info.address)">
              <text class='Immediatereturn_fd1_0_c3_c1'>{{info.area_area}}{{info.address}}</text>
              <text class='self-end flex-sub Immediatereturn_fd1_0_c3_c1_c1'>复制</text>
            </view> -->
          </view>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch Immediatereturn_fd1_1'>
          <view class='flex flex-wrap align-center justify-between flex-sub'>
            <text>快递公司</text>
            <benben-input class='Immediatereturn_fd1_1_c0_c1' type="text" :placeholder="`请输入快递公司`" confirm-type="done"
              v-model="express_company" :maxlength="-1" :adjust-position='true'
              placeholder-style="color:#999;font-size:28rpx" />
          </view>
          <view class='flex flex-wrap align-center justify-between flex-sub Immediatereturn_fd1_1_c1'>
            <text>快递单号</text>
            <benben-input class='Immediatereturn_fd1_1_c0_c1' type="text" :placeholder="`请输入快递单号`" confirm-type="done"
              v-model="express_no" :maxlength="-1" :adjust-position='true'
              placeholder-style="color:#999;font-size:28rpx" />
          </view>
        </view>
        <button class='Immediatereturn_fd1_2' @click.stop="submit">保存</button>
      </view>

      <!---flex布局flex布局结束-->
      <view class="flex benben-position-layout flex flex-wrap align-center Immediatereturn_flex_2"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>


    </view>
  </view>
</template>
<script>
  export default {
    components: {},


    data() {
      return {
        info: '',
        express_company: '顺丰速运',
        express_no: '',
        order_id: '',
        order_sn: ''
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      let {
        order_id,
        order_sn
      } = options
      if (order_id !== undefined) this.order_id = order_id
      if (order_sn !== undefined) this.order_sn = order_sn
      this.getData()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      submit() {
        if (!this.express_company) {
          this.$message.info('请输入快递公司名称')
          return
        }
        if (!this.express_no) {
          this.$message.info('请输入快递号')
          return
        }
        this.$api.post(global.apiUrls.post662f088328ec6, {
          express_company: this.express_company,
          express_no: this.express_no,
          order_id: this.order_id,
        }).then(res => {
          if (res.data.code == 1) {
            this.$message.info(res.data.msg)
            setTimeout(result => {
              uni.navigateBack()
            }, 800)
          } else {
            this.$message.info(res.data.msg)
          }
        })
      },
      getData() {
        this.$api.post(global.apiUrls.post662f08d78bdbe, {

        }).then(res => {
          if (res.data.code == 1) {
            this.info = res.data.data
          }
        })
      },
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .Immediatereturn_flex_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .Immediatereturn_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .Immediatereturn_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .Immediatereturn_fd0_0_c0 {
    width: 120rpx;
  }

  .Immediatereturn_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .Immediatereturn_fd1_2 {
    background: #B50E0E;
    border-radius: 44rpx;
    width: 686rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: #fff;
    height: 88rpx;
    position: fixed;
    bottom: calc(100rpx + var(--window-bottom));
    left: 32rpx;
  }

  .Immediatereturn_fd1_1_c1 {
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .Immediatereturn_fd1_1_c0_c1 {
    text-align: right;
  }

  .Immediatereturn_fd1_1 {
    background: var(--benbenbgColor1);
    padding: 24rpx;
    background-size: 100% auto;
    margin: 0rpx auto 0rpx auto;
    width: 710rpx;
  }

  .Immediatereturn_fd1_0_c3_c1_c1 {
    color: var(--benbenFontColor4);
    text-align: right;
  }

  .Immediatereturn_fd1_0_c3_c1 {
    width: 450rpx;
  }

  .Immediatereturn_fd1_0_c3 {
    padding: 0rpx 0rpx 12rpx 0rpx;
  }

  .Immediatereturn_fd1_0_c1_c0 {
    color: rgba(127, 127, 127, 1);
    width: 200rpx;
  }

  .Immediatereturn_fd1_0_c1 {
    padding: 0rpx 0rpx 32rpx 0rpx;
  }

  .Immediatereturn_fd1_0_c0_c1 {
    font-size: 32rpx;
    color: rgba(21, 21, 21, 1);
    font-weight: 600;
  }

  .Immediatereturn_fd1_0_c0_c0 {
    background: var(--benbenbgColor7);
    width: 6rpx;
    height: 30rpx;
    margin: 0rpx 10rpx 0rpx 10rpx;
    transform: scaleX(0.5);
  }

  .Immediatereturn_fd1_0_c0 {
    border-bottom: 1px solid #eee;
    padding: 0rpx 0rpx 24rpx 0rpx;
  }

  .Immediatereturn_fd1_0 {
    background: var(--benbenbgColor1);
    padding: 24rpx;
    background-size: 100% auto;
    border-radius: 16rpx;
    width: 710rpx;
    margin: 24rpx auto 24rpx auto;
  }

  .Immediatereturn_flex_2 {
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
  }
</style>
